﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using XRGLib;
using Console = XRGLib.Console;

namespace Examples
{
    class Example1 : ExampleBase
    {
        public Example1(Console console, int width, int height, Game game)
            : base(console, width, height, game)
        {
        }

        public override string Description
        {
            get { return "True color drawing"; }
        }

        float shift;
        public override void Update(GameTime gameTime)
        {
            
        }

        public override Surface ReDraw()
        {
            shift += 0.5f;

            for (int y = 0; y < surface.Height; y++)
            {
                for (int x = 0; x < surface.Width; x++)
                {
                    float hue = shift + (x + y);
                    Color col = ColorHelper.CreateFromHSV(hue, 1, 1);

                    char c = (char)rand.GetRandomCharacter("!@#$%^&*()");
                    surface.PrintChar(x, y, c, Color.Black,col);
                }
            }

            return base.ReDraw();
        }
    }
}
